package com.zjzywl.smoke.config;

public final class BaseDataConfig {
	/*
	 * 设备类型
	 *
	 */
	public final static String SMOKE = "SMOKE"; // 烟感
	public final static String SIGNAL_BASE_STATION = "SIGNAL_BASE_STATION";// 信号基站

	public final static String S2021D_LW_WELLLID = "S2021D_LW_WELLLID"; // 罗万阴井盖
	public final static String LW_LIGHT = "LW_LIGHT";// 路灯
	public final static String LW_Trash = "LW_Trash";// 垃圾桶监测
	public final static String LW_Humiture = "LW_Humiture";// 温湿度监测
	public final static String LW_Magnet = "LW_Magnet";// 地磁监测
	public final static String LW_Infrared = "LW_Infrared";// 红外监测
	/*
	 * 赛特威尔烟感设备状态数据
	 */
	public final static Integer GS517_SMOKE_DS_FIRE = 1; // 烟雾报警
	public final static Integer GS517_SMOKE_DS_SILENCE = 2; // 静音
	public final static Integer GS517_SMOKE_DS_TROUBLE = 3; // 故障
	public final static Integer GS517_SMOKE_DS_LOWL = 4; // 低电
	public final static Integer GS517_SMOKE_DS_NORMAL = 7; // 正常
	public final static Integer GS517_SMOKE_DS_SELFTEST = 9;// 自检

	/*
	 * 罗万S2021D阴井盖状态类型
	 */
	public final static Integer S2021D_LW_WELLLID_MOVE = 10; // 井盖移动
	public final static Integer S2021D_LW_WELLLID_LOWL = 12; // 低电
	public final static Integer S2021D_LW_WELLLID_NORMAL = 11; // 正常关闭
	public final static Integer S2021D_LW_WELLLID_TROUBLE = 14; // 故障

	/*
	 * 路灯设备状态数据
	 */
	public final static Integer LW_LIGHT_OPEN = 20;// 路灯1打开
	public final static Integer LW_LIGHT_OPEN2 = 21;// 路灯2打开
	public final static Integer LW_LIGHT_CLOSE = 24;// 路灯统一关闭

	/*
	 * 垃圾箱监测设备状态数据
	 */
	public final static Integer LW_Trash_Normal = 30;// 正常
	public final static Integer LW_Trash_Fill = 31;// 溢满
	public final static Integer LW_Trash_Hot = 32;// 高温
	public final static Integer LW_Trash_Fall = 33;// 倾倒

	/*
	 * 温湿度监测设备状态数据
	 */
	public final static Integer LW_Humiture_Normal = 60;// 正常
	public final static Integer LW_Humiture_Heat = 61;// 温湿度告警
	public final static Integer LW_Humiture_TROUBLE = 62; // 故障

	/*
	 * 地磁监测设备状态数据
	 */
	public final static Integer LW_Magnet_Car = 40;// 有车
	public final static Integer LW_Magnet_NoCar = 41;// 无车
	/*
	 * 红外监测设备状态数据
	 */
	public final static Integer LW_Infrared_Normal = 50;// 红外正常
	public final static Integer LW_Infrared_Down = 51;// 红外拆盖告警
	public final static Integer LW_Infrared_Leave = 052;// 离墙告警

	/*
	 * 设备类别
	 */
	public final static String DEVICETYPE_SMOKE = "001";// 烟感
	public final static String DEVICETYPE_GAS = "002";// 气感
	public final static String DEVICETYPE_CAMERA = "003";// 摄像头
	public final static String DEVICETYPE_LIGHT = "004";// 路灯
	public final static String DEVICETYPE_WELLLID = "005";// 阴井盖
	public final static String DEVICETYPE_Trash = "006";// 垃圾箱
	public final static String DEVICETYPE_Humiture = "007";// 温湿度检测
	public final static String DEVICETYPE_Magnet = "008";// 地磁检测
	public final static String DEVICETYPE_Infrared = "009";// 红外检测
	/*
	 * 设备报警基础类型
	 */
	public final static String ALARM_FIRE = "001"; // 火警
	public final static String ALARM_LOW = "002"; // 低压(低电)
	public final static String ALARM_TROUBLE = "003"; // 故障
	public final static String ALARM_MOVE = "010"; // 井盖移动
	public final static String ALARM_Fall = "031"; // 垃圾箱溢满
	public final static String ALARM_Hot = "032"; // 垃圾箱高温
	public final static String ALARM_Down = "051"; // 拆盖告警
	public final static String ALARM_Leave = "052"; // 离墙告警
	public final static String ALARM_Heat = "061"; // 温湿度告警

	/*
	 * 设备状态基础类型
	 */
	// public final static String DEV_STATUES_NORMAL = "STATUES_NORMAL"; //正常待机
	// public final static String DEV_STATUES_SILENCE = "STATUES_SILENCE"; //静音
	// public final static String DEV_STATUES_SELFTEST = "STATUES_SELFTEST"; //自检信息
	// public final static String DEV_STATUES_FIRE = "STATUES_FIRE"; //火警
	// public final static String DEV_STATUES_TROUBLE = "STATUES_TROUBLE"; //故障
	// public final static String DEV_STATUES_LOW = "STATUES_LOW"; //低压(低电)

	/*
	 * websocket命令字
	 */
	public final static String CMD_SENDALARM = "cmd_sendAlarm"; // 报警信息
	public final static String CMD_ALARMDISPOSESYNC = "cmd_alarmDispseSync"; // 报警处理各个客户端同步

	/*
	 * 根据设备类型获取设备默认状态，增加设备时添加状态表数据使用
	 */
	public static Integer getNormal(String deviceType) {
		if (deviceType.equals(DEVICETYPE_SMOKE)) {
			return GS517_SMOKE_DS_NORMAL;
		} else if (deviceType.equals(DEVICETYPE_WELLLID)) {
			return S2021D_LW_WELLLID_NORMAL;
		}
		if (deviceType.equals(DEVICETYPE_Humiture)) {
			return LW_Humiture_Normal;
		}
		if (deviceType.equals(DEVICETYPE_Infrared)) {
			return LW_Infrared_Normal;
		}
		if (deviceType.equals(DEVICETYPE_LIGHT)) {
			return LW_LIGHT_CLOSE;
		} else {
			return 0;
		}
	}
}
